package com.bmps.springcloud.insuredmicroservice.model.trail.response;

import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;

/**
 * @Author :  zlc
 * @Date : 2019/9/10 11:39
 **/
public class TrailResponseHeaderModel implements Serializable {

    private String requestType;
   
    @JSONField(name="UUID")
    private String UUID;
    
    private String sendTime;
    
    private String responseCode;
    
    private ErrorListModel errorList;

    public String getRequestType() {
        return requestType;
    }

    public void setRequestType(String requestType) {
        this.requestType = requestType;
    }

    public String getUUID() {
        return UUID;
    }

    public void setUUID(String UUID) {
        this.UUID = UUID;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }

    public ErrorListModel getErrorList() {
        return errorList;
    }

    public void setErrorList(ErrorListModel errorList) {
        this.errorList = errorList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}

        if (o == null || getClass() != o.getClass()) {return false;}

        TrailResponseHeaderModel that = (TrailResponseHeaderModel) o;

        return new EqualsBuilder()
                .append(requestType, that.requestType)
                .append(UUID, that.UUID)
                .append(sendTime, that.sendTime)
                .append(responseCode, that.responseCode)
                .append(errorList, that.errorList)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(requestType)
                .append(UUID)
                .append(sendTime)
                .append(responseCode)
                .append(errorList)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "TrailResponseHeaderModel{" +
                "requestType='" + requestType + '\'' +
                ", UUID='" + UUID + '\'' +
                ", sendTime='" + sendTime + '\'' +
                ", responseCode='" + responseCode + '\'' +
                ", errorList=" + errorList +
                '}';
    }
}
